(use-modules
 ;; SRFI 64 for unit testing facilities
 (srfi srfi-64)
 ;; utils - the code to be tested
 ((helpers string-helpers)))


(test-begin "string-helpers-test")


(test-group
 "string-repeat"

 (test-equal "three times a string"
   "blablabla"
   (string-repeat "bla" 3))

 (test-equal "one time only"
   "blub"
   (string-repeat "blub" 1))

 (test-equal "zero repetition should be empty string"
   ""
   (string-repeat "sadasdasdblub" 0)))


(test-group
 "string-padding"
 ;; (string-padding str width char #:key (padding-direction 'left))

 (test-equal "pad left"
   ".bla"
   (string-padding "bla" 4 "." #:padding-direction 'left))

 (test-equal "pad left"
   ".......bla"
   (string-padding "bla" 10 "." #:padding-direction 'left)))



(test-end "string-helpers-test")
